﻿Option Explicit On
Option Strict On

Imports LogginsLogDSTableAdapters

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load

        'Note to Tony: This code below allows for split testing of the web page
        'If Not Page.IsPostBack Then
        '    Dim strSplitTesting As String = ConfigurationManager.AppSettings("SplitTestingEnabled").ToString()
        '    If strSplittesting.equals("True") Then
        '        'This is a time-based example
        '        Dim intMinute As Int16 = CShort(Now.Minute)
        '        If strSplitTesting = "True" Then
        '            If intMinute >= 1 And intMinute < 15 Then
        '                Response.Redirect("~/st/a.aspx") 'landing page  = 1
        '            ElseIf intMinute >= 15 And intMinute < 30 Then
        '                Response.Redirect("~/st/b.aspx") 'landing page = 2
        '            ElseIf intMinute >= 30 And intMinute < 45 Then
        '                Response.Redirect("~/st/a.aspx") 'landing Page = 1
        '            Else
        '                Response.Redirect("~/st/b.aspx") 'landing(Page = 2
        '            End If
        '        End If
        '    Else
        '        'Do nothing
        '    End If
        'End If
    End Sub

    Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        Try
            NewGoogleCalendarEvent.CreateEvent(ConfigurationManager.AppSettings("GoogleCalendarUsername").ToString(), ConfigurationManager.AppSettings("GoogleCalendarPassword").ToString(), TextBox1.Text, "test content", "1", "Test Place", "1", "1")
        Catch ex As Exception
            Label1.Text = ex.Message
        End Try
    End Sub
End Class
